using System;
using System.Collections.Generic;
using System.Text;

using GURUCORE.Framework.Core.Util.Configuration;

namespace GURUCORE.Portal.Core
{
    [System.Diagnostics.DebuggerStepThrough]
	public class WebsiteConfiguration : ConfigurationBase
	{
		public const string GLOBAL_CACHE_KEY = "WebsiteConfiguration";

        #region PUBLIC PROPERTIES
        
		private bool m_bRemotePortalServer;
		private string m_sPortalServerAddress;
		private string m_sWebsiteUniqueID;
		private string m_sDefaultTheme;
		private string m_sPageExtension;
		private int m_nAdminGridItemPerPage;
		

		[ConfigurationKey("RemotePortalServer")]
		public bool RemotePortalServer
		{
			get
			{
				return m_bRemotePortalServer;
			}
			set
			{
				m_bRemotePortalServer = value;
			}
		}

		[ConfigurationKey("PortalServerAddress")]
		public string PortalServerAddress
		{
			get
			{
				return m_sPortalServerAddress;
			}
			set
			{
				m_sPortalServerAddress = value;
			}
		}

		[ConfigurationKey("WebsiteUniqueID")]
		public string WebsiteUniqueID
		{
			get
			{
				return m_sWebsiteUniqueID;
			}
			set
			{
				m_sWebsiteUniqueID = value;
			}
		}

		[ConfigurationKey("DefaultTheme")]
		public string DefaultTheme
		{
			get
			{
				return m_sDefaultTheme;
			}
			set
			{
				m_sDefaultTheme = value;
			}
		}

		[ConfigurationKey("PageExtension")]
		public string PageExtension
		{
			get
			{
				return m_sPageExtension;
			}
			set
			{
				m_sPageExtension = value;
			}
        }

		[ConfigurationKey("AdminGridItemPerPage")]
		public int AdminGridItemPerPage
		{
			get
			{
				if (m_nAdminGridItemPerPage == 0)
				{
					m_nAdminGridItemPerPage = 10;
				}
				return m_nAdminGridItemPerPage;
			}
			set
			{
				m_nAdminGridItemPerPage = value;
			}
		}

        #endregion

        public WebsiteConfiguration(string p_sConfigFile)
            : base(p_sConfigFile, "WebsiteConfiguration")
        {

        }
	}
}
